package com.huawei.zyb.taskManager.infrastructure.persistence.po;

import java.time.LocalDateTime;

/**
 * 参考文档持久化对象
 */
public class ReferenceDocumentPO {
    private Long id;
    private String documentId;
    private Long requirementId;
    private String title;
    private String url;
    private String description;
    private String type;
    private String uploader;
    private Integer viewCount;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    private LocalDateTime lastViewedAt;

    // 默认构造函数
    public ReferenceDocumentPO() {}

    // 全参构造函数
    public ReferenceDocumentPO(Long id, String documentId, Long requirementId, String title,
                              String url, String description, String type, String uploader, Integer viewCount,
                              LocalDateTime createdAt, LocalDateTime updatedAt, LocalDateTime lastViewedAt) {
        this.id = id;
        this.documentId = documentId;
        this.requirementId = requirementId;
        this.title = title;
        this.url = url;
        this.description = description;
        this.type = type;
        this.uploader = uploader;
        this.viewCount = viewCount;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
        this.lastViewedAt = lastViewedAt;
    }

    // Getters and Setters
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDocumentId() {
        return documentId;
    }

    public void setDocumentId(String documentId) {
        this.documentId = documentId;
    }

    public Long getRequirementId() {
        return requirementId;
    }

    public void setRequirementId(Long requirementId) {
        this.requirementId = requirementId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUploader() {
        return uploader;
    }

    public void setUploader(String uploader) {
        this.uploader = uploader;
    }

    public Integer getViewCount() {
        return viewCount;
    }

    public void setViewCount(Integer viewCount) {
        this.viewCount = viewCount;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public LocalDateTime getLastViewedAt() {
        return lastViewedAt;
    }

    public void setLastViewedAt(LocalDateTime lastViewedAt) {
        this.lastViewedAt = lastViewedAt;
    }

    @Override
    public String toString() {
        return "ReferenceDocumentPO{" +
                "id=" + id +
                ", documentId='" + documentId + '\'' +
                ", requirementId='" + requirementId + '\'' +
                ", title='" + title + '\'' +
                ", type='" + type + '\'' +
                ", viewCount=" + viewCount +
                "}";
    }
}